home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Graphics
/
GraphicsWrap
/
Source
/
AbsPoly.m
< prev
next >
Wrap
Text File
|
1991-09-17
|
746b
|
51 lines
/* Generated by Interface Builder */
#import "AbsPoly.h"
#import <objc/List.h>
#import "miscutil.h"
#import "CmdBgnpoly.h"
#import "CmdVertex.h"
#import "CmdEndpoly.h"
@implementation AbsPoly
- init
{
[super init];
vertexList=[[List alloc] init];
command="Polygon";
return self;
}
- addCommand:aCmd
{
[vertexList addObject:aCmd];
return self;
}
- commandList { return vertexList; }
- free
{
[vertexList free];
return self;
}
- doCmd
{
[theBitmap cmdDrawPoly:[vertexList copy]];
return self;
}
- (char *)emitCmd
{
int i, max=[vertexList count];
char tCmd[8192];
strcpy(tCmd, [[vertexList objectAt:0] emitCmd]);
for(i=1;i<max;i++)
strcat(tCmd,[[vertexList objectAt:i] emitCmd]);
return strdup(tCmd);
}
@end